package day04.interFace1;

/**
 * @author yangwenqi
 * @decs TODO
 * @date 2025/4/22
 */
public class Employee extends Person implements Add{
    private String ID;
    private int work_age;
    public Employee() {
    }

    public Employee(String name,String address,String ID, double wage, int work_age) {
        super(name, address,wage);
        this.ID = ID;
        this.work_age = work_age;
    }

    /**
     * 获取
     * @return ID
     */
    public String getID() {
        return ID;
    }

    /**
     * 设置
     * @param ID
     */
    public void setID(String ID) {
        this.ID = ID;
    }


    /**
     * 获取
     * @return work_age
     */
    public int getWork_age() {
        return work_age;
    }

    /**
     * 设置
     * @param work_age
     */
    public void setWork_age(int work_age) {
        this.work_age = work_age;
    }

    public String toString() {
        return "Employee{name="+getName()+",address="+getAddress()+",ID = " + ID + ", wage = " + getWage() + ", work_age = " + work_age + "}";
    }

    @Override
    public double add(double salary) {
        this.setWage(salary*=1.1);
        return this.getWage();
    }
}
